<?php
/**
 * Created by PhpStorm.
 * User: stupboy
 * Date: 2018/3/23
 * Time: 11:43
 * Mail:87658989@qq.com
 */

namespace app\api\logic;


class Request
{
    public $params;
    public $paramsNum;

    public function __construct($params)
    {
        $this->params = $params;
        $this->toNum($this->params);
    }

    public function one($code=1){
        return $this->paramsNum[$code-1];
    }

    public function all(){
        return $this->paramsNum;
    }

    public function toNum($arr){
        $this->paramsNum = assocToNum($arr);
        return $this;
    }
}